package routers

import (
	"github.com/gin-gonic/gin"
	"net/http"
	"shop-ease/handlers"
)

func Init() *gin.Engine {
	r := gin.Default()

	r.GET("/", func(c *gin.Context) {
		c.String(http.StatusOK, "hello World!")
	})

	r.GET("/login", handlers.Login)

	r.POST("/add", handlers.Add)

	r.POST("/upload", handlers.Upload)

	r.GET("/detail", handlers.Detail)

	r.GET("/del", handlers.Delete)

	r.GET("/list", handlers.List)

	return r

}
